<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            width: 200px;
            margin: 0;
            padding: 0;
        }
        .box{
            background-color: blue;
            overflow: auto;
        }
        .margin{
            width: 100px;
            height: 100px;
            display: inline-block;
            margin: 50px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="margin"></div>
        <div class="margin"></div>
    </div>
</body>
</html>